<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" layout:decorator="layout/base">
<head>
	<title>客户<span th:if="${status == '0'}">历史</span>操作记录</title>
	<script type="text/javascript" th:src="@{/assets/js/plugins/pickers/daterangepicker.js}"></script>
</head>

<body>

	<!-- Page header -->
	<div class="page-header" layout:fragment="page-header">
		<div class="page-header-content">
			<div class="page-title">
				<h4><i class="icon-arrow-left52 position-left"></i> <span class="text-semibold" th:text="#{web.name}">管理系统</span> - 客户<span th:if="${status == '0'}">历史</span>操作记录</h4>
			</div>
		</div>
	</div>
	<!-- /page header -->


	<!-- Main content -->
	<div class="content-wrapper" layout:fragment="content">
		
		<div class="panel panel-default">
							<div class="panel-heading">
								<h6 class="panel-title">客户<span th:if="${status == '0'}">历史</span>操作记录</h6>
								<div th:if="${orderId == null}" class="heading-elements panel-tabs">
									<ul class="nav nav-tabs nav-tabs-bottom">
									<li class="active"><a href="#panel-tab3" data-toggle="tab"><i class="position-left"></i>所有操作记录</a></li>
										 <!-- <li class="active"><a href="#panel-tab1" data-toggle="tab"><i class="position-left"></i>今日操作记录</a></li>
										<li ><a href="#panel-tab2" data-toggle="tab"><i class="position-left"></i>明日操作记录</a></li> -->
										
									</ul>
			                	</div>
							</div>
							<div class="panel-tab-content tab-content">
								<!-- <div class="tab-pane active has-padding" id="panel-tab1">
									<form id="query1" action="#" class="form-horizontal">
											<div class="row">
												<div class="col-md-3">
													<div class="form-group">
														<label class="col-lg-3 control-label">医生/护士:</label>
														<div class="col-lg-9">
															<input type="text" name="operator" class="form-control" placeholder="医生/护士 模糊查询" />
														</div>
													</div>
												</div>
												
												<div th:if="${orderId == null}" class="col-md-3">
													<div class="form-group">
														<label class="col-lg-3 control-label">客户姓名:</label>
														<div class="col-lg-9">
															<input type="text" name="customerName" class="form-control" placeholder="客户姓名 模糊查询" />
														</div>
													</div>
												</div>
												
												<div class="col-md-3">
													<div class="form-group">
														<label class="col-lg-3 control-label">项目:</label>
														<div class="col-lg-9">
														 	<select name="productName" class="select form-control input-xs">
																<option value="-1">请选择项目</option>
																<option th:each="product : ${productList}" th:value="${product.productName}" th:text="${product.productName}"></option>
															</select>	
														</div>
													</div>
												</div>
												
												<div class="col-md-3 ">
													<div class="form-group">
														<input th:if="${orderId == null}" name="operationTime" type="hidden" th:value="${today}"/>
														<input type="hidden" name="orderId" th:value="${orderId}"></input>
														<input type="hidden" name="status" th:value="${status}"></input>
														<button type="button" id="submit1" class="btn btn-primary">查询 <i class="icon-search position-right"></i></button>
														<button type="button" class="btn btn-primary btn-add" data-toggle="modal" data-target="#edit_dialog">新增<i class="icon-user-plus position-right"></i></button>
													</div>
												</div>
											</div>
					        			</form>
									<table class="table today-datatable-basic datatable-basic table-striped table-hover">
										<thead>
											<tr class="bg-primary">
												<th>客户名称</th>
												<th>渠道商</th>
												<th>医生/护士</th>
												<th>是否赠送</th>
												<th>操作时间</th>
												<th>操作地点</th>
												<th>操作状态</th>
												<th>操作项目</th>
												<th>备注</th>
												<th>操作</th>
											</tr>
										</thead>
										<tbody class="border-dashed">
											
										</tbody>
									</table>
								</div>

								<div class="tab-pane has-padding" id="panel-tab2">
									<form id="query2" action="#" class="form-horizontal">
											<div class="row">
												<div class="col-md-3">
													<div class="form-group">
														<label class="col-lg-3 control-label">医生/护士:</label>
														<div class="col-lg-9">
															<input type="text" name="operator" class="form-control" placeholder="医生/护士 模糊查询" />
														</div>
													</div>
												</div>
												
												<div class="col-md-3">
													<div class="form-group">
														<label class="col-lg-3 control-label">客户姓名:</label>
														<div class="col-lg-9">
															<input type="text" name="customerName" class="form-control" placeholder="客户姓名 模糊查询" />
														</div>
													</div>
												</div>
												
												<div class="col-md-3">
													<div class="form-group">
														<label class="col-lg-3 control-label">项目:</label>
														<div class="col-lg-9">
														 	<select name="productName" class="select form-control input-xs">
																<option value="-1">请选择项目</option>
																<option th:each="product : ${productList}" th:value="${product.productName}" th:text="${product.productName}"></option>
															</select>	
														</div>
													</div>
												</div>
					
												<div class="col-md-3 ">
													<div class="form-group">
														<input name="operationTime" type="hidden" th:value="${tomorrow}"/>
														<input type="hidden" name="orderId" th:value="${orderId}"></input>
														<input type="hidden" name="status" th:value="${status}"></input>
														<button type="button" id="submit2" class="btn btn-primary">查询 <i class="icon-search position-right"></i></button>
														<button type="button" class="btn btn-primary btn-add" data-toggle="modal" data-target="#edit_dialog">新增<i class="icon-user-plus position-right"></i></button>
													</div>
												</div>
											</div>
					        			</form>
									<table class="table tomorrow-datatable-basic datatable-basic table-striped table-hover">
										<thead>
											<tr class="bg-primary">
												<th>客户名称</th>
												<th>渠道商</th>
												<th>医生/护士</th>
												<th>是否赠送</th>
												<th>操作时间</th>
												<th>操作地点</th>
												<th>操作状态</th>
												<th>操作项目</th>
												<th>备注</th>
												<th>操作</th>
											</tr>
										</thead>
										<tbody class="border-dashed">
											
										</tbody>
									</table>
								</div> -->
								
								<div class="tab-pane active has-padding" id="panel-tab3">
									<div class="panel-body">
					        			<form id="query3" action="#" class="form-horizontal">
											<div class="row">
												<div class="col-md-3">
													<div class="form-group">
														<label class="col-lg-3 control-label">医生/护士:</label>
														<div class="col-lg-9">
															<input type="text" name="operator" class="form-control" placeholder="医生/护士 模糊查询" />
														</div>
													</div>
												</div>
												
												<div class="col-md-3">
													<div class="form-group">
														<label class="col-lg-3 control-label">客户姓名:</label>
														<div class="col-lg-9">
															<input type="text" name="customerName" class="form-control" placeholder="客户姓名 模糊查询" />
														</div>
													</div>
												</div>
												
												<div class="col-md-3">
													<div class="form-group">
														<label class="col-lg-3 control-label">项目:</label>
														<div class="col-lg-9">
														 	<select name="productName" class="select form-control input-xs">
																<option value="-1">请选择项目</option>
																<option th:each="product : ${productList}" th:value="${product.productName}" th:text="${product.productName}"></option>
															</select>	
														</div>
													</div>
												</div>
					
											</div>
											
											<div class="row">
											
												<div class="col-md-3">
													<div class="form-group">
														<label class="col-lg-3 control-label">开始时间：</label>
														<div class="col-lg-9">
															<input type="text" id="operationBeginTime" name="operationBeginTime" class="form-control" placeholder="开始时间" />
														</div>
													</div>
												</div>
												
												<div class="col-md-3">	
													<div class="form-group">
														<label class="col-lg-3 control-label">结束时间：</label>
														<div class="col-lg-9">
															<input type="text" id="operationEndTime" name="operationEndTime" class="form-control" placeholder="结束时间" />
														</div>
													</div>
												</div>
											
												<div class="col-md-3 ">
													<div class="form-group">
														<input type="hidden" name="orderId" th:value="${orderId}"></input>
														<input type="hidden" name="status" th:value="${status}"></input>
														<button type="button" id="submit3" class="btn btn-primary">查询 <i class="icon-search position-right"></i></button>
														<button type="button" class="btn btn-primary btn-add" data-toggle="modal" data-target="#edit_dialog">新增<i class="icon-user-plus position-right"></i></button>
													</div>
												</div>											
											</div>
					        			</form>
									<table class="table all-datatable-basic datatable-basic table-striped table-hover">
										<thead>
											<tr class="bg-primary">
												<th>客户名称</th>
												<th>渠道商</th>
												<th>医生/护士</th>
												<th>是否赠送</th>
												<th>操作时间</th>
												<th>操作地点</th>
												<th>操作状态</th>
												<th>操作项目</th>
												<th>备注</th>
												<th>操作</th>
											</tr>
										</thead>
										<tbody class="border-dashed">
											
										</tbody>
									</table>
								</div>
							</div>
							</div>
							</div>
				
		<div id="edit_dialog" class="modal fade in">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal">×</button>
						<h5 class="modal-title text-primary">编辑操作</h5>
					</div>

					<form action="#" id="edit">
						<div class="modal-body">
							<div class="form-group" th:if="${customerName != null}">
								<label>客户：<span th:text="${customerName}"></span></label>
							</div>
						
							<div class="form-group" th:if="${customerName == null}">
								<label th:if="${customerName != null}">客户：<span th:text="${customerName}"></span></label>
								<label >客户：</label><select name="customerId" class="select form-control input-xs js-example-basic-single">
										<option value="-1" >选择客户</option>
										<option th:each="customer : ${customerList}" th:value="${customer[0]}" th:text="${customer[1]}"></option>
									</select>
								
							</div>
						
							<div class="form-group">
								<label>医生/护士<span class="text-danger">*</span></label>
                                <input type="text" id="operator"  name="operator" class="form-control" placeholder="医生/护士" required="true"/>
								<!-- <input name="operator" type="text" placeholder="医生/护士" class="form-control" required="true" maxlength="50"/> -->
							</div>

							<div class="form-group">
								<label>操作时间<span class="text-danger">*</span></label>	
								<input type="text" id="operationTime" readonly="readonly" name="operationTime" class="form-control" required="true" placeholder="操作时间" />
							</div>
							
							<div class="form-group">
								<label>操作地点<span class="text-danger">*</span></label>
								<select name="address" class="select form-control input-xs">
										<option value="-1">选择操作地点</option>
										<option  value="本机构">本机构</option>
										<option  value="店内">店内</option>
								</select>	
							</div>
							
							<div class="form-group">
								<label>是否赠送<span class="text-danger">*</span></label>
								<select id="presentStatus" name="presentStatus" class="select form-control input-xs">
																<option value="-1">是否赠送</option>
																<option th:each="status : ${presentStatusList}" th:value="${status.index}" th:text="${status.name}"></option>
															</select>	
							</div>
							
							<div class="form-group">
								<label>操作项目</label>
								<select name="productId" class="select form-control input-xs js-example-basic-single"  multiple="multiple">
									<option value="-1">请选择项目</option>
									<option th:each="product : ${productList}" th:value="${product.productId}" th:text="${product.productName}"></option>
								</select>	
							</div>
							
							
							<div class="form-group">
												<label>备注</label>	
												<textarea name="remark" rows="3" cols="20" placeholder="备注" class="form-control"></textarea>
											</div>
							
							<input type="hidden" name="status"></input>
							<input name="id" type="hidden" />
							<input name="productName" type="hidden"/>
							<input name="orderId" type="hidden" th:value="${orderId}"/>
						</div>
							
						<div class="modal-footer">
							<button type="button" class="btn btn-link" data-dismiss="modal">关闭</button>
							<button type="button" id="submitEdit" class="btn btn-primary" >保存</button>
						</div>
					</form>
				</div>
			</div>
		</div>
		
		
		<script type="text/templete" id="btnGroup">
			<div class="btn-group" data-toggle="buttons">
				<button type="button" class="btn btn-link text-primary btn-edit" data-toggle="modal" data-target="#edit_dialog">编辑</button>
				<button type="button" class="btn btn-link text-primary btn-down">已操作</button>
				<button type="button" class="btn btn-link text-danger btn-del" >删除</button>
			</div>
		</script>
		
		<!-- /table -->
		<script type="text/javascript" th:src="@{/oss/js/customerOperation.js}"></script>
	</div>
	<!-- /main content -->

</body>
</html>

